﻿@model IEnumerable<usedcartrade.Models.Car>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/SiteLayout.cshtml";
}

@section TitleSection{
}

@section ContentBody{
    <h2>Index</h2>

    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.user.ID)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CarName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.checkedinfo)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.cartype)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.carbrand)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.user.ID)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CarName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.checkedinfo)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.cartype)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.carbrand)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
                    @Html.ActionLink("Details", "Details", new { id = item.ID }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.ID })
                </td>
            </tr>
        }

    </table>
}
